<template>
	<div>
		<template v-if="mode === 'D'">
			<design-default-form :form="form"></design-default-form>
		</template>
		<!--		<template v-else-if="form.perm === 'R'">-->
		<!--			{{form.props.value}}-->
		<!--		</template>-->
		<template v-else>
			<el-input-number style="width: 100%" controls-position="right" v-model="form.props.value"
				:precision="form.props.radixNum" :disabled="form.perm === 'R'" :placeholder="form.placeholder" />
			<template v-if="form.props.showChinese">
				<el-text>
					大写：
				</el-text>
				<el-text type="info">
					{{ convertCurrency(form.props.value) }}
				</el-text>
			</template>
		</template>
	</div>
</template>

<script lang="ts" setup>
// 工作流模版-表单设计-组件-金额输入框
import { defineExpose } from "vue";
import DesignDefaultForm from "./config/designDefaultForm.vue";
import * as util from '../../utils/objutil'
import { convertCurrency } from "../../utils/objutil";

let props = defineProps({
	mode: {
		type: String,
		default: 'D'
	},
	form: {
		type: Object, default: () => {
		}
	}
});
</script>

<style scoped lang="less"></style>